package com.ep.modules.app.controller;

import com.ep.common.annotation.SysLog;
import com.ep.common.utils.PageUtils;
import com.ep.common.utils.R;
import com.ep.common.validator.ValidatorUtils;
import com.ep.modules.app.entity.AppContainerArea整理;
import com.ep.modules.app.service.AppContainerArea整理Service;
import java.util.Map;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/app/container_area整理")
public class AppContainerArea整理Controller {
    @Autowired
    private AppContainerArea整理Service appContainerArea整理Service;

    @GetMapping("/list")
    public R list(Map<String, Object> params) {
        PageUtils page = appContainerArea整理Service.queryPage(params);
        return R.ok().put("page", page);
    }

    @GetMapping("/info/{id}")
    public R info(@PathVariable Long id) {
        AppContainerArea整理 appcontainerarea整理 = appContainerArea整理Service.getById(id);
        return R.ok().put("appcontainerarea整理", appcontainerarea整理);
    }

    @SysLog("保存AppContainerArea整理")
    @PostMapping("/save")
    public R save(@RequestBody AppContainerArea整理 appcontainerarea整理) {
        ValidatorUtils.validateEntity(appcontainerarea整理);
        appContainerArea整理Service.save(appcontainerarea整理);
        return R.ok();
    }

    @SysLog("修改AppContainerArea整理")
    @PostMapping("/update")
    public R update(@RequestBody AppContainerArea整理 appcontainerarea整理) {
        ValidatorUtils.validateEntity(appcontainerarea整理);
        appContainerArea整理Service.update(appcontainerarea整理);
        return R.ok();
    }

    @SysLog("删除AppContainerArea整理")
    @PostMapping("/delete")
    public R delete(@RequestBody Long[] ids) {
        appContainerArea整理Service.deleteBatch(ids);
        return R.ok();
    }
}